﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NHModel.Entities
{
    public class Documents
    {
        #region Member Variables

        protected int _id;
        protected string _fileName;
        protected string _filePos;
        protected DateTime _createTime;
        protected Orders _orders;
        protected UserInfo _user;


        #endregion

        #region Constructors

        public Documents() { }

        public Documents(string fileName, string filePos, DateTime createTime, Orders orders, UserInfo user)
        {
            this._fileName = fileName;
            this._filePos = filePos;
            this._createTime = createTime;
            this._orders = orders;
            this._user = user;
        }

        #endregion

        #region Public Properties

        public virtual int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public virtual string FileName
        {
            get { return _fileName; }
            set
            {
                if (value != null && value.Length > 50)
                    throw new ArgumentOutOfRangeException("Invalid value for FileName", value, value.ToString());
                _fileName = value;
            }
        }

        public virtual string FilePos
        {
            get { return _filePos; }
            set
            {
                if (value != null && value.Length > 50)
                    throw new ArgumentOutOfRangeException("Invalid value for FilePos", value, value.ToString());
                _filePos = value;
            }
        }

        public virtual DateTime CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }

        public virtual Orders Orders
        {
            get { return _orders; }
            set { _orders = value; }
        }

        public virtual UserInfo User
        {
            get { return _user; }
            set { _user = value; }
        }


        #endregion

    }
}
